package com.example.demo.service.impl;

import com.example.demo.domain.Attendance;
import com.example.demo.domain.Vo.AttendanceVo;
import com.example.demo.mapper.AttendanceMapper;
import com.example.demo.service.IAttendanceService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AttendanceServiceImpl implements IAttendanceService {

    @Autowired
    private AttendanceMapper attendanceMapper;

    /**
     * 查询考勤
     * @param attendance
     * @return
     */
    @Override
    public List<AttendanceVo> selectAttendance(Attendance attendance) {
        return attendanceMapper.selectAttendance(attendance);
    }

    /**
     * 新增考勤
     * @param attendance
     */
    @Override
    public void insertAttendance(Attendance attendance) {
        attendanceMapper.insertAttendance(attendance);
    }

    /**
     * 修改考勤
     * @param attendance
     */
    @Override
    public void updateAttendanceById(Attendance attendance) { attendanceMapper.updateAttendanceById(attendance);}

    /**
     * 删除考勤
     * @param attendanceId
     */
    @Override
    public void delAttendanceById(long attendanceId) { attendanceMapper.delAttendanceById(attendanceId);}

}
